package common.statusenum;

import java.util.HashMap;

/**
 * 导出日志枚举
 *
 * @author yuanqinglong
 * @since 2020/9/8 9:50
 */
public enum ExportLogEnum {

    /**
     * 导出日志状态
     */
    BUILDING("1", "生成中"),
    GENERATED("2", "已生成"),
    FAILED_TO_BUILD("3", "生成失败");


    private final String code;
    private final String msg;

    ExportLogEnum(String code, String msg) {
        this.code = code;
        this.msg = msg;
    }


    public String getCode() {
        return this.code;
    }


    public String getMsg() {
        return this.msg;
    }

    static HashMap<String, String> map = new HashMap(32);

    static {
        for (ExportLogEnum value : ExportLogEnum.values()) {
            map.put(value.code, value.msg);
        }
    }

    public static String getMsgByCode(String code) {
        return map.get(code);
    }

}
